<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../../../common/common.jsp" %>

<%--smiditor富文本的css--%>
<link rel="stylesheet" type="text/css" href="/smiditor/styles/simditor.css" />
<%--smiditor富文本的js--%>
<script type="text/javascript" src="/smiditor/scripts/jquery.min.js"></script>
<script type="text/javascript" src="/smiditor/scripts/module.js"></script>
<script type="text/javascript" src="/smiditor/scripts/hotkeys.js"></script>
<script type="text/javascript" src="/smiditor/scripts/uploader.js"></script>
<script type="text/javascript" src="/smiditor/scripts/simditor.js"></script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>云众科技网上预约挂号系统</title>
	<style type="text/css">

	</style>
</head>

<body>
<div class="container">
	<form class="form-horizontal text-center" style="position:relative;"  name="infoForm" action="javascript:doSub()" method="post" enctype="multipart/form-data">
		<input type="hidden" name="hospitalId" value="${byId.hospitalId}">
		<div class="container" >

			<div class="form-group">
				<label class="control-label col-sm-2 col-md-2">医院名称:</label>
				<div class="col-md-4 col-sm-4">
					<input class="form-control" name="hospitalName" value="${byId.hospitalName}" autocomplete="off" required  placeholder="请输入医院名称"/>
				</div>
			</div>

			<div class="form-group">
				<label class="control-label col-sm-2 col-md-2">医院简介:</label>
				<div class="col-md-4 col-sm-4">
					<input class="form-control" name="hospitalInfo" value="${byId.hospitalInfo}" autocomplete="off" required  placeholder="请输入医院简介"/>
				</div>
			</div>

			<textarea id="editor" name="hospitalPic" autocomplete="off" placeholder="请输入首页图片" autofocus>${byId.hospitalPic}</textarea>


			<div class="form-group">
				<div class="col-lg-4 col-md-4 col-sm-2 col-xs-2">

				</div>
				<div class=" col-lg-4 col-md-4 col-sm-8 col-xs-8" >
					<div class="col-md-6 col-sm-6">
						<input class="form-control btn-primary" type="submit" value="提交" />
					</div>
					<div class="col-md-6 col-sm-6">
						<input class="form-control btn-primary" type="button" onclick="goBack()" value="返回" />
					</div>
				</div>
				<div class="col-lg-4 col-md-4 col-sm-2 col-xs-2">

				</div>
			</div>
		</div>
	</form>
	<hr/>
</div>
</body>
<script type="text/javascript">
	//提交方法
	function doSub(){
		bootbox.confirm("确定要提交吗?", function(result) {
			if(result){
				$("form[name='infoForm']").attr("action","<%=request.getContextPath()%>/baseinfo/editsaveshowHospitalInfo");
				$("form[name='infoForm']").submit();
			}
		})
	}
	function goBack(){
		history.go(-1);
	}




	$(function(){
		Simditor.locale = 'zh-CN';//设置中文
		var editor = new Simditor({
			textarea: $("#editor"),  //textarea的id
			placeholder: '',
			// toolbar:  ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'], //工具条都包含哪些内容
			pasteImage: true,//允许粘贴图片
			defaultImage: '/ueditor/jsp/upload/image/20171114/1510644097980099578.jpg',//编辑器插入的默认图片，此处可以删除
			upload : {
				url : 'http://localhost:8081/api/v1/files/upload', //文件上传的接口地址
				params: null, //键值对,指定文件上传接口的额外参数,上传的时候随文件一起提交
				fileKey:'file', //服务器端获取文件数据的参数名
				connectionCount: 10,
				leaveConfirm: '正在上传文件'
			}
		});
	})
</script>
</html>